package queue;

public class QueryOfArray<Item> {

    private Item[] items =(Item[]) new Object[1];

    private Integer count = 0;

    private int tail = 0;

    private int head = 0;

    public void enQueue(Item item){
        if(tail == items.length){
            return;
        }
        items[tail ++] = item;
    }

    public Item deQueue(){
        if(head == tail){
            return null;
        }
        return items[head++];
    }
}
